﻿using FluentValidation;

namespace YL.Core.Entity.Fluent.Validation
{
    public class MeterDeviceInfoFluent : AbstractValidator<DeviceInfo>
    {
        public MeterDeviceInfoFluent()
        {
            RuleFor(x => x.DeviceName).NotNull().NotEmpty().WithMessage("设备名称不能为空").Length(1, 20).WithMessage("设备名称长度不能超过20");
            //RuleFor(x => x.ClientId).NotNull().NotEmpty().WithMessage("设备所在区域不能为空");
        }
    }
}